#include "password.h"
#include "ui_password.h"
#include<QDebug>
password::password(QWidget *parent) :
    QFrame(parent),
    ui(new Ui::password)
{
    ui->setupUi(this);
    ui->lineEdit->setEchoMode(QLineEdit::Password);
}

password::~password()
{
    delete ui;
}

void password::on_toolButton_clicked()
{

    isVisible = -isVisible;
    if(isVisible == -1){
        ui->lineEdit->setEchoMode(QLineEdit::Password);
        ui->toolButton->setStyleSheet("QToolButton{border-image:url(:/png/可视-填充(1)1.png);border-style:solid;}  QToolButton:hover{border-image:url(:/png/可视-填充.png);}");
    }
    else{
        ui->lineEdit->setEchoMode(QLineEdit::Normal);
        ui->toolButton->setStyleSheet("QToolButton{border-image:url(:/png/可视-填充(1).png);border-style:solid;}  QToolButton:hover{border-image:url(:/png/可视-填充1.png);}");
    }
}
